package ningbo.oop;

/**
 * @Author 宁铂
 * @Date 2021/7/8 16:59
 * @Version 1.0
 */
public class TestMethodPrivate {
    public static void main(String[] args) {
        Dog dog = new Dog();
        dog.eat();
    }
}

class Dog{
    public void eat(){
        System.out.println("小狗爱吃小狗肉");
        play();
    }

    private void play(){
        System.out.println("小狗爱拆家具");
    }
}